<style scoped>

</style>
<template>
    <li class="w-goodsList-item" >
        <div class="w-goods w-goods-l w-goods-ing m-user-goods">
            <div class="w-goods-pic">
                <a href="javascript:;" data-href="?c=detail&amp;id={{goodsId}}" v-link="{path:'/detail',query:{id:item.goodsId}}">
                    <img :src="item.goodsImg">
                </a>
            </div>
            <div class="w-goods-info">
                <p class="w-goods-title f-txtabb"><a href="javascript:;" data-href="?c=detail&amp;id={{goodsId}}" v-link="{path:'/detail',query:{id:item.goodsId}}">{{item.goodsName}}</a></p>
                <p class="w-goods-period">期号：{{item.periods}}</p>

                <template v-if="item.endTime">
                    <div class="m-user-goods-owner m-user-box">
                        <div class="m-user-box-name">获得者：</div>
                        <div class="m-user-box-cont">
                            <template v-if="!!item.lucklyManId">

                                <a href="javascript:;" v-link="{name:'profile',query:{id:item.lucklyManId}}">{{item.lucklyMan}}</a>
                            </template>

                            <template v-else>
                                <a href="javascript:;" >{{item.lucklyMan}}</a>
                            </template>
                            (本期共参与<strong>{{item.luncklyCount}}</strong>人次)
                        </div>
                    </div>
                    <p class="m-user-goods-code">幸运号码：<span class="txt-impt">{{item.lucklyCode}}</span></p>
                    <p class="m-user-goods-time">揭晓时间：{{item.endTime}}</p>
                </template>
                <template v-else>
                    <div class="w-progressBar">
                        <p class="wrap">
                            <span class="bar" :style="{width:100-(item.need/item.totalNeed)*100+'%'}"><i class="color"></i></span>
                        </p>
                        <ul class="txt">
                            <li class="txt-l">
                                <p>总需{{item.totalNeed}}</p>
                            </li>
                            <li class="txt-r">
                                <p>剩余<b class="txt-blue">{{item.need}}</b></p>
                            </li>
                        </ul>
                    </div>
                </template>

                <div class="m-user-goods-my">
                    本期参与：<span class="txt-impt">{{item.count}}</span>人次
                </div>
            </div>
            <div class="w-goods-shortFunc">

                <template v-if="!item.endTime">
                    <a v-if="item.need!=0" href="javascript:;" class="w-button w-button-main w-button-s" data-href="?c=detail&amp;id={{goodsId}}" v-link="{path:'/detail',query:{id:item.goodsId}}">跟买</a>
                </template>
            </div>
        </div>
    </li>


</template>
<script>
    module.exports = {
        props:{

            item:{
                type:Object,
                default:{}
            },

        },
        data() {
            return {}
        },
        components: {},
        created(){

        },
        ready() {

        },
        beforeDestroy() {

        },
        methods: {}
    }
</script>
